<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${loanUser.id}"  type="hidden">
							<div class="form-group">用户基础信息：</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">手机号码：</label>
								<div  style="top: 8px;" class="col-sm-3" th:text="${loanUser.mobile}"></div>
								<label class="col-sm-3 control-label">真实姓名：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.realName}"></div>
								<input type="hidden" id = "realname" th:value="${loanUser.realName}" >
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">用户学历：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.education}"></div>
								<label class="col-sm-3 control-label">婚姻状况：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.marriage}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">用户户籍：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.censusAddress}"></div>
								<label class="col-sm-3 control-label">注册时间：</label>
								<div  style="top: 8px;" class="col-sm-3" th:text="${loanUser.createTime}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">公司名字：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.companyName}"></div>
								<label class="col-sm-3 control-label">入职年限：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.entryPeriod}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">公司地址：</label>
								<div style="top: 8px;" class="col-sm-8" th:text="${loanUser.companyAddress}"></div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">公司性质：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.companyType}"></div>	
								<label class="col-sm-3 control-label">公司电话：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.companyPhone}"></div>
							</div>
							<div class="form-group">用户联系信息：</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">姓名：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cName1}"></div>
								<label class="col-sm-1 control-label">关系：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cRelationship1}"></div>
								<label class="col-sm-1 control-label">手机：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.cMoblie1}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">姓名：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cName2}"></div>
								<label class="col-sm-1 control-label">关系：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cRelationship2}"></div>
								<label class="col-sm-1 control-label">手机：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.cMoblie2}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">姓名：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cName3}"></div>
								<label class="col-sm-1 control-label">关系：</label>
								<div style="top: 8px;" class="col-sm-2" th:text="${loanUser.cRelationship3}"></div>
								<label class="col-sm-1 control-label">手机：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.cMoblie3}"></div>
							</div>
							<div class="form-group">用户银行信息：</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">身份证号：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.idNo}"></div>
								<label class="col-sm-3 control-label">银行卡号：</label>
								<div  style="top: 8px;" class="col-sm-3" th:text="${loanUser.cardNo}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">银行名称：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.bankName}"></div>
								<label class="col-sm-3 control-label">认证状态：</label>
								<div style="top: 8px;" style="color:red;font-weight: bold"  class="col-sm-3" th:text="${loanUser.bankStatus}"></div>
							</div>
							<div class="form-group">人脸认证信息：【<span style="color:#0064ff">ps:人脸识别自动审核,无需人工(除手持身份证外)</span>】</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">活体分数：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.score}"></div>
								<label class="col-sm-3 control-label">认证状态：</label>
								<div style="top:8px;" style="color:red;font-weight: bold"  class="col-sm-3" th:text="${loanUser.faceStatus}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">识别码值：</label>
								<div style="top: 8px;" class="col-sm-3" th:text="${loanUser.create}"></div>
								<label class="col-sm-3 control-label">语音识别：</label>
								<div style="top: 8px;"  class="col-sm-3" th:text="${loanUser.identify}"></div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">认证图片：</label>
								<div style="top: 8px;" class="col-sm-1">
								<a th:href="@{${loanUser.pic1}}" target="_blank" ><img th:src="${loanUser.pic1}" style="width:60px;height:60px;"/></a>
								</div>
								<label class="col-sm-2 control-label">认证图片：</label>
								<div style="top: 8px;"  class="col-sm-1">
								<a th:href="@{${loanUser.pic2}}" target="_blank" ><img th:src="${loanUser.pic2}" style="width:60px;height:60px;"/></a>
								</div>
								<label class="col-sm-2 control-label">认证图片：</label>
								<div style="top: 8px;"  class="col-sm-1">
								<a th:href="@{${loanUser.pic3}}" target="_blank" ><img th:src="${loanUser.pic3}" style="width:60px;height:60px;"/></a>
								</div>
							</div>
						</form>
					</div>
					<div class="form-group">
						<div class="col-sm-8 col-sm-offset-3" th:if="${loanUser.numStatus} eq '1'">
						<input id="userIdValue" th:value="${loanUser.id}" type="hidden"/>
							<button type="submit" class="btn btn-primary" onclick="pass();">证件照审核通过</button>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<button type="submit" class="btn btn-primary" onclick="nopass();">证件照审核驳回</button>
						</div>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>

	<script>
        $(function () {
            downloadresume();
            var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
            parent.layer.close(index);
        });
	function pass(){
		var id=$("#userIdValue").val();
		$.ajax({
			cache : true,
			type : "POST",
			url : "/system/loanUser/hasPass",
			data : {"id":id,"status":2},
			async : false,
			error : function(request) {
				parent.layer.alert("Connection error");
			},
			success : function(data) {
				if (data.code == 0) {
					parent.layer.msg("操作成功");
					parent.reLoad();
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);

				} else {
					parent.layer.alert(data.msg)
				}

			}
		});
		

	}
	function nopass(){
		var id=$("#userIdValue").val();
		$.ajax({
			cache : true,
			type : "POST",
			url : "/system/loanUser/hasPass",
			data : {"id":id,"status":0},
			async : false,
			error : function(request) {
				parent.layer.alert("Connection error");
			},
			success : function(data) {
				if (data.code == 0) {
					parent.layer.msg("操作成功");
					parent.reLoad();
					var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
					parent.layer.close(index);

				} else {
					parent.layer.alert(data.msg)
				}

			}
		});
	}
	</script>
	<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
	<!--以上两个文件是js把html转pdf文件的两个库 -->
	<script>
        //html文件转成pdf格式文件函数
        function downloadresume(){
            var pdf = new jsPDF('p', 'pt', 'a4');
            pdf.internal.scaleFactor = 1;
            var options = {
                pagesplit: true
            };
            //$('.pdf-wrapper')
            pdf.addHTML($(".ibox-content"), options, function() {
                console.log(pdf);
                pdf.save($("#realname").val()+'认证信息.pdf');
            });
        }
	</script>
</body>
</html>
